home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / fwkcs117.zip / REPLACE.BAT < prev    next >
DOS Batch File  |  1992-02-12  |  5KB  |  147 lines

  1. @echo off
  2. cls
  3. echo - Part of FWKCS(TM) Contents_Signature System, Version 1.17.
  4. echo - (C)Copyright Frederick W. Kantor 1989-1992. All rights reserved.
  5. echo -
  6. echo - Your use of the FWKCS(TM) Contents_Signature System is at solely your own
  7. echo - risk. For safety, please have proper backups of your files.
  8. echo -
  9. echo - REPLACE.BAT to replace a working FWKCS(TM) system, Ver. 1.12 or later;
  10. echo - for use in same directory with FWKCS117.ZIP, FWKCS.117, and FWKCS_TM.117.
  11. echo -
  12. echo - To proceed, have QBASIC, GWBASIC, BASICA, or BASIC available on your path,
  13. echo -               as appropriate for your operating system;
  14. echo -             have a working copy of FWKCS.COM in \CSA, containing your
  15. echo -               macros, paths, etc.
  16. echo -      (If you are installing FWKCS(TM) for the first time, use INSTALL.BAT.)
  17. echo -                                                               ~~~~~~~~~~~
  18. echo -  Usage:   REPLACE d D "<enter>"
  19. echo -
  20. echo -   where   d  without ":" is the drive for the \CS directory
  21. echo -           D  without ":" is the drive for the \CSA directory
  22. if "%1" == "/*" goto end
  23. if .%1 == . goto nd
  24. if .%2 == . goto nod2
  25. echo -
  26. echo -  Are these drives correct:  %1:\CS  and  %2:\CSA ?  If not, stop now!
  27. echo -  To quit, press Ctrl+C, then y                            ~~~~~~~~
  28. echo -
  29. pause
  30. if not exist fwkcs117.zip goto nv117
  31. if exist 0_setup.bat del 0_setup.bat > nul
  32. if exist 0_setup.bat attrib -r 0_setup.bat > nul
  33. if exist 0_setup.bat del 0_setup.bat > nul
  34. pkunzip 0_setup.bat > nul
  35. if errorlevel 1 goto zex
  36. goto nz
  37. :zex
  38. if exist 2_setup.bat del 2_setup.bat > nul
  39. if exist 2_setup.bat attrib -r 2_setup.bat > nul
  40. if exist 2_setup.bat del 2_setup.bat > nul
  41. if exist s_setup.bat del s_setup.bat > nul
  42. if exist s_setup.bat attrib -r s_setup.bat > nul
  43. if exist s_setup.bat del s_setup.bat > nul
  44. if exist myowncsl.srt del myowncsl.srt > nul
  45. if exist myowncsl.srt attrib -r myowncsl.srt > nul
  46. if exist myowncsl.srt del myowncsl.srt > nul
  47. if exist #@!#@!^^.@!@ del #@!#@!^^.@!@ > nul
  48. if exist #@!#@!^^.@!@ attrib -r #@!#@!^^.@!@ > nul
  49. if exist #@!#@!^^.@!@ del #@!#@!^^.@!@ > nul
  50. if exist @@!#@!^^.@!@ del @@!#@!^^.@!@ > nul
  51. if exist @@!#@!^^.@!@ attrib -r @@!#@!^^.@!@ > nul
  52. if exist @@!#@!^^.@!@ del @@!#@!^^.@!@ > nul
  53. echo sort test > #@!#@!^^.@!@
  54. qsort #@!#@!^^.@!@ @@!#@!^^.@!@ > nul
  55. del #@!#@!^^.@!@ > nul
  56. if not exist @@!#@!^^.@!@ goto nsrt
  57. cls
  58. del @@!#@!^^.@!@ > nul
  59. if not exist fwkcstmp.117 goto n1
  60. if exist fwkhi.com del fwkhi.com > nul
  61. if exist fwkhi.com attrib -r fwkhi.com > nul
  62. if exist fwkhi.com del fwkhi.com > nul
  63. pkunzip -o fwkcstmp.117 fwkhi.com > nul
  64. if exist fwkhi.com goto n2
  65. :n1
  66. if not exist fwkcs.117 goto nd
  67. if not exist fwkcs_tm.117 goto cm
  68. ren fwkcs_tm.117 fwkcs_tm.com > nul
  69. fwkcs_tm < fwkcs.117 >fwkcstmp.117
  70. if errorlevel 1 goto fbad
  71. ren fwkcs_tm.com fwkcs_tm.117 > nul
  72. pkunzip -o fwkcstmp.117 fwkhi.com > nul
  73. if not exist fwkhi.com goto fbad
  74. :n2
  75. cls
  76. echo -
  77. echo -  Should I enter FWKCS117.ZIP's contents_signatures for future reference?
  78. echo -
  79. echo -    Press either 0 or 1 to answer:   0 = NO.  1 = YES.
  80. echo -
  81. :ask1
  82. fwkhi
  83. if errorlevel 2 goto ask1
  84. if not errorlevel 1 goto nocs
  85. if exist fwkcs117.zip ren fwkcs117.zip @@!#@!^^.@!@ > nul
  86. ren fwkcstmp.117 fwkcs117.zip > nul
  87. pkunzip -o fwkcs117.zip fwkcs.com > nul
  88. fwkcs /1 fwkcs117.zip #@!#@!^^.@!@
  89. ren fwkcs117.zip fwkcstmp.117 > nul
  90. if exist @@!#@!^^.@!@ ren @@!#@!^^.@!@ fwkcs117.zip > nul
  91. if not exist fwkcs.com pkunzip fwkcs117.zip fwkcs.com > nul
  92. if exist fwkcs117.zip fwkcs /1 fwkcs117.zip >> #@!#@!^^.@!@
  93. qsort #@!#@!^^.@!@
  94. fwkcs #@!#@!^^.@!@ nul myowncsl.srt /ms
  95. del #@!#@!^^.@!@ > nul
  96. del fwkcs.com > nul
  97. :nocs
  98. pkunzip fwkcstmp.117 s_setup.bat > nul
  99. del fwkhi.com > nul
  100. s_setup %1 ! %2 0
  101. :nv117
  102. echo -
  103. echo -  REPLACE.BAT is for use in the same directory with all these
  104. echo -  files together:  FWKCS117.ZIP, FWKCS.117, and FWKCS_TM.117.
  105. goto clu
  106. :nz
  107. echo -
  108. echo -  Where is Phil Katz's PKUNZIP(R)?
  109. goto nz1
  110. :nsrt
  111. echo -
  112. echo -  Where is Ben Baker's QSORT Version 3.20 ?
  113. :nz1
  114. echo -
  115. echo -  Please check your path and mapping...
  116. echo -
  117. echo -  After you correct this problem,
  118. goto helpr
  119. :fbad
  120. del fwkcstmp.117 > nul
  121. ren fwkcs_tm.com fwkcs_tm.117 > nul
  122. echo -
  123. echo -  Bad file. Execution aborted.
  124. :clu
  125. echo -
  126. echo -  Please clean up, and try again. See README.TXT.
  127. goto end
  128. :cm
  129. echo -
  130. echo -  I need FWKCS_TM.117.
  131. echo -
  132. echo -        I quit!
  133. goto end
  134. :nod2
  135. echo -
  136. echo -   I need two drive entries (they can both have the same letter).
  137. :helpr
  138. echo -
  139. echo -   Please try again...
  140. goto end
  141. :nd
  142. echo -
  143. echo -    Nothing to do!
  144. :end
  145. if exist fwkhi.com del fwkhi.com > nul
  146. echo -
  147.